@using king.models;
@model Product;
@{Layout=null;}

<style>
    table,td
    {
        border: 2px solid;
    }
</style>

<table>
    @if (Model==null)
    {
    <tr>
        <td>ID</td>
        <td><input type="text" name="newid" value="0"></td>
    </tr>
    <tr>
        <td>商品名称</td>
        <td><input type="text" name="newnames"></td>
    </tr>
    <tr>
        <td>供应商名称</td>
        <td><input type="text" name="newname"></td>
    </tr>
    <tr>
        <td>价格</td>
        <td><input type="text" name="newjiage"></td>
    </tr>
    <tr>
        <td>库存数量</td>
        <td><input type="text" name="newku"></td>
    </tr>
    <tr>
        <td>备注</td>
        <td><input type="text" name="newbei"></td>
    </tr>

    }
    else
    {
            <tr>
        <td>ID</td>
        <td><input type="text" name="newid" value="@Model.Id"></td>
    </tr>
    <tr>
        <td>商品名称</td>
        <td><input type="text" name="newnames" value="@Model.ProductName"></td>
    </tr>
    <tr>
        <td>供应商名称</td>
        <td><input type="text" name="newname" value="@Model.Supplier"></td>
    </tr>
    <tr>
        <td>价格</td>
        <td><input type="text" name="newjiage" value="@Model.Price"></td>
    </tr>
    <tr>
        <td>库存数量</td>
        <td><input type="text" name="newku" value="@Model.Stock"></td>
    </tr>
    <tr>
        <td>备注</td>
        <td><input type="text" name="newbei" value="@Model.Remarks"></td>
    </tr>
 }
             <input type="button" id="bao" value="保存" ">
             <input type="button" id="qu" value="取消" ">


</table>
<script src="~/root/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/base.js"></script>
